package com.zifuchuan.stringtest;

import java.util.Scanner;

/*
需求：键盘录入一个字符串，使用程序实现在控制台遍历该字符串
 */
public class Test02 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入");
        String s = sc.nextLine();
        char[]chars=s.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            //  chars[i]
            System.out.println(chars[i]);
        }

    }
}
